<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRecordPowerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('record_power', function (Blueprint $table) {

            $table->increments('id');
            $table->timestamp('add_time')->default(DB::raw('CURRENT_TIMESTAMP'))->comment('添加时间');
            $table->string('out_account',100)->nullable()->comment('转账账号');
            $table->string('out_phone',100)->nullable()->comment('转账手机号');
            $table->string('shift_account',100)->nullable()->comment('转入账号');
            $table->string('shift_phone',100)->nullable()->comment('转入手机号');
            $table->integer('amount')->default(0)->comment('转账数量');
            $table->string('type','100')->default('miner' )->comment('类型');
            $table->string('type_note','100')->default('miner' )->comment('类型说明');
            $table->string('transfer_type','100')->default('' )->comment('整体还是部分');
            $table->string('power_type','100')->default('' )->comment('矿机还是算力');
            $table->string('m_number','100')->default('' )->comment('矿机编号');
            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation = 'utf8_unicode_ci';

        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::table('user', function (Blueprint $table) {
//            //
//        });
    }
}
